Intelligent auto cropping of digital images

ABSTRACT

Disclosed in some examples are methods, systems, computing devices, and machine readable mediums that provide for cropping systems that automatically crop digital images using one or more smart cropping techniques. Smart cropping techniques may include: cropping an image based upon emotion detection, cropping based upon facial recognition and matching, and cropping based upon landmark matching. In some examples, a single smart cropping technique may be utilized. In other examples, a combination of the smart cropping techniques may be utilized.

BACKGROUND

Digital image capture has exploded thanks to small, light, andinexpensive digital cameras. These cameras focus light onto a lightsensor such as a Charge Coupled Device (CCD), a Complementarymetal-oxide-semiconductor (CMOS), or other light sensor. The lightsensor then converts the light into a digital representation of theimage.

SUMMARY

Sonic examples disclosed herein pertain to image processing. Someexamples disclosed herein relate to processing a digital image bycropping the image. For example, the system may receive a digital image,detect faces in the digital image and for each particular face determinean emotion displayed by the particular face. The detected faces areclustered into two or more clusters, each particular cluster comprisingfaces displaying emotions that are the same or are classified as relatedto other faces in the particular cluster. The system may then select acluster of the two or more clusters and crop the digital image basedupon the faces in the selected cluster. Other cropping techniques arealso discussed, including cropping based upon facial recognitionmatching with other faces in other images, and landmark detection.

BRIEF DESCRIPTION OF THE DRAWINGS

In the drawings, which are not necessarily drawn to scale, like numeralsmay describe similar components in different views. Like numerals havingdifferent letter suffixes may represent different instances of similarcomponents. The drawings illustrate generally, by way of example, butnot by way of limitation, various embodiments discussed in the presentdocument.

FIG. 1 shows an example digital image according to sonic examples of thepresent disclosure.

FIG. 2 shows a diagram of a cropping system according to some examplesof the present disclosure.

FIG. 3 shows a method for automatically cropping an image according tosome examples of the present disclosure.

FIG. 4 shows a method of cropping based upon emotion detection accordingto some examples of the present disclosure.

FIG. 5 shows a method of cropping based upon facial recognitionaccording to sonic examples of the present disclosure.

FIG. 6 shows a method of cropping based upon landmark detectionaccording to some examples of the present disclosure.

FIG. 7 shows a method of combining multiple cropping methods to producean automatic cropping according to some examples of the presentdisclosure.

FIG. 8 is a block diagram illustrating an example of a machine uponwhich one or more embodiments may be implemented.

DETAILED DESCRIPTION

The explosion of digital image capture has also led to an explosion inthe different usages of digital images. Aside from storing images indigital storage (e.g., on a hard-disk drive or a solid state drive) ornetwork-based (cloud) storage, users may share images on socialnetworks, place them in files, presentations, online, photo sharingservices, and the like. Before these pictures are stored or utilized,many users will want to modify or adjust the settings of the pictures.For example, the brightness, contrast, zoom, and in sonic examples,cropping the image. Cropping an image is an image operation that removesa portion of the image (e.g., the outer portions) to improve framing,accentuate subject matter, or change aspect ratio. Such cropping may beuseful to remove undesirable backgrounds, objects, people, or otherthings from the image.

These image modifications may be difficult to accomplish on a smartphoneor other mobile device. For example, the limited screen real-estate andinput options may make cropping manually cumbersome. Due to thesefrustrations, many users download the pictures to a desktop computer,and edit the digital image there using the larger display and easierinput options (e.g., a mouse, keyboard, and the like). This slows downthe time between capturing the image and making use of the image andprovides an annoyance to the user.

Disclosed in some examples are methods, systems, computing devices, andmachine readable mediums that provide for cropping systems thatautomatically crop digital images using one or more smart croppingtechniques. Smart cropping techniques may include: cropping an imagebased upon emotion detection, cropping based upon facial recognition andmatching, and cropping based upon landmark matching. In some examples, asingle smart cropping technique may be utilized. In other examples, acombination of the smart cropping techniques may be utilized. The systemutilizes the one or more smart cropping techniques to produce a proposedcropping region in the digital image. The proposed cropping region isthe area of the image that will remain after the cropping operation. Thecomputing device may then display the digital image with the proposedcropping region represented by lines (or curves) superimposed on thedigital image. The user may then accept the proposed cropping regionas-is or modify the proposed cropping region. User acceptance of theproposed cropping region without modifications may serve as positivereinforcement that may be utilized to refine the cropping system. Usermodification or rejection of the proposed cropping rectangle may serveas negative reinforcement that may be also utilized to refine one ormore machine learning models. The methods and systems disclosed hereinmay operate on single images, or may be performed on multiple images insuccession.

Smart Cropping Using Emotion Detection

In some examples, the system may crop the image based upon emotiondetection of persons in the digital image. That is, the system maydetect one or more faces in the digital image, process the faces todetermine emotions expressed by those faces and then crop based upon thefacial emotions. For example, the system may crop to (e.g., leave in thefinal image) all faces expressing the same (or similar) emotions. Thismay be allow the system to differentiate between faces of a group ofusers that are together (e.g., posing for a photograph) vs. individualswho are simply passing by or who are otherwise not part of the group.Typically individuals posing together for a photo would display similaremotions (e.g., happiness, or other emotions).

Turning now to FIG. 1, an example digital image 100 is shown accordingto some examples of the present disclosure. The system has detectedfaces 110, 120, 130, and 140. In some examples face detection may beaccomplished using a genetic algorithm and an eigen-face technique. Forexample, possible human eye regions are detected by testing all thevalley regions in a gray-level representation of the image. The geneticalgorithm may then calculate candidate face regions (e.g., nose, mouth,and chin). Candidate face regions may be normalized and the fitnessvalue of the candidates may be measured using a projection on theeigen-faces. Face candidates with a fitness value above a threshold maybe selected.

Once faces are detected, they may be processed to determine emotions. Insome examples, to determine emotions, the system may utilize a codingscheme such as the Facial Action Coding System (FACS) developed by PaulEkman to code facial expressions and use those codes as input into aBayesian network to determine emotions from the facial codes. Facesexpressing similar emotions may be clustered together. For example, agroup of smiling persons may be clustered together, as a smile may beassociated with happiness. The system may then select one or more of theclusters and output the locations of the detected faces within thatcluster as areas of interest for determining a proposed cropping region.In some examples, the areas of interest are only the faces, but in otherexamples, the areas of interest may extend to include the body of thedetected face. As noted, the proposed cropping region is a region of theoriginal image that is the final output image. Thus, the system crops-tothe proposed cropping region, deleting the image outside the croppingregion and utilizing the cropping region as the new image. A controllermay then produce the proposed cropping region based upon these areas ofinterest (and in some examples, areas of interest output by othertechniques). The controller may then crop to these regions of interest.

If more than one cluster of similar emotions are present, to select oneor more of the clusters (wherein the faces in the clusters are the areasof interest identified by the smart cropping based upon emotiondetection), various algorithms may be utilized. For example, the systemmay select the cluster that is closest to the center of the image. Forexample, in FIG. 1, the system may cluster faces 110-130 into one groupand face 140 into another group. In other examples, the cluster with thehighest number of detected faces may be selected. In yet other examples,a facial recognition matching algorithm may be utilized to selectclusters. That is, the system may determine a match between a face in acluster of the digital image and stored images from an image library ofthe user. The algorithms used to achieve this are the same or similar asthe algorithms utilized in the smart cropping using facial recognitionmatching discussed elsewhere in the present disclosure. The system mayselect all clusters including a face that match a face in a photo in auser's photo library (e.g., online or locally stored) or a face thatmatches a face in a photo posted by them to their social networkingaccount or by their friends (i.e., connections) on their socialnetworking accounts may be selected and used to determine the regions ofinterest.

In some examples, just the faces are returned as areas of interest, butin other examples, the entire person corresponding to the selected facesare included as areas of interest. This allows for wider shots. Whetherthe face or whether the entire body of the user is included may be aselectable option that the user may select.

Smart Cropping Using Facial Recognition Matching

In some examples, to determine areas of interest used to determine acropping region a library of images or photos posted to a socialnetworking service (either to the user's profile or to the profiles ofthe user's connections) may be used to recognize faces of peoplefamiliar to the user. Facial recognition techniques such as principalcomponent analysis using eigen-faces, linear discriminant analysis,elastic bunch graph matching, hidden Markov models, and the like may beutilized. For example, the algorithm may identify facial features byextracting landmarks (e.g., size and shape of the eyes, position of themouth, and shape of the jaw) from an image of the subject's face. Thesefeatures may be utilized to search for other images in a library ofimages that have similar features.

The presence of a matching face in a library of pictures or posted to asocial networking page or site corresponding to the user suggests thatthe user knows the person and would like that person in the finalcropped image. In addition to a personal library of a user's pictures,the system may have a library of pictures of famous persons. Thus, ifthe user meets a famous person and takes a picture, the system mayrecognize the famous person as someone that should be included in thecropped photo.

As noted, the system may select one or more of the recognized faces foroutputting as areas of interest. For example, in FIG. 1, if the systemdetermines that faces 110-130 are in previous pictures in the user'slibrary, but not face 140, the system may output the rectangles aroundthe faces as areas of interest to a controller that may then determinethe final proposed cropping rectangle (or other shape). In someexamples, all faces that are recognized are returned as areas ofinterest, but in other examples, some recognized faces may be returnedas areas of interest while others are ignored. For example, the facialrecognition algorithm may have a confidence value that numericallyrepresents the confidence that the algorithm has that the face in thedigital image matches a face in a picture in the user's digital libraryor on social media. Faces with confidence scores above a predeterminedthreshold may be returned as areas of interest, whereas faces withconfidence scores below the predetermined threshold may be ignored. Inother examples, in cases where multiple faces are detected, otheralgorithms may be used to select from multiple recognized faces. Forexample, emotion detection may be applied to select recognized faceswith similar emotions. In some examples, a predetermined number ofrecognized faces nearest the center of the image may be chosen.

As noted above, the areas of interest may be returned to a controllerthat may then determine a cropping region based upon the identifiedareas of interest. As with the emotion detection smart cropping, in someexamples, just the faces are returned as areas of interest, but in otherexamples, the entire person corresponding to the selected faces areincluded as areas of interest. This allows for wider shots. Whether theface or whether the entire body of the user is included may be aselectable option that the user may change. While facial recognitionmatching was described, in other examples, an entire body may be matchedand detected. For example, a person's body shape may be matched to abody shape of a person that is in a different picture in a picturelibrary.

Landmark Detection

In addition to facial detection, the system may compare the digitalimage to a plurality of stored images of various famous landmarks.Example landmarks may include the Statute of Liberty, the Eiffel Tower,the Washington Monument, Lincoln Memorial, and more. The landmarks maybe manmade, natural, or the like. In some examples, the system mayutilize metadata about the image (e.g., geolocation) to determine likelylandmarks. The system may select one of the recognized landmarks foroutputting as areas of interest.

Methods may utilize machine learning. For example, photos may utilizemultiple layers of clustering to first cluster images based ongeolocation, then each geolocation cluster may be clustered based uponvisual appearance. Each of these clusters may then be a model specificto a particular landmark. A new digital image may be compared to each ofthese models to determine the closest fit (e.g., using k-nearestneighbor). The algorithm may then assign the landmark to the image basedupon determining that a confidence score is above a predeterminedthreshold. The bounding box for the landmark may be utilized as the areaof interest.

For instances in which multiple landmarks may be present, the landmarkdetection may utilize all landmarks as areas of interest. In otherexamples, one or more of the landmarks may be selected. For example,landmarks nearest identified faces or nearest a group of facesdisplaying similar emotions, or the like.

Combinations

The above methods may be utilized alone, or in combination. For example,as already mentioned, some methods may be utilized to refine the abovemethods and assist them in selecting from multiple options. In otherexamples, methods may be run separately and the areas of interestidentified by each method may be utilized to create the proposedcropping region. In some examples, the proposed cropping region mayinclude all the areas of interest identified by the various croppingtechniques. In other examples, the areas of interest may have acorresponding confidence score that reflect a numerical indication ofthe confidence that the technique has that the area of interest isvalid. Areas of interest with confidence scores above a predeterminedthreshold may be utilized to create the proposed cropping region. Inother examples, the confidence scores may be multiplied by a weightingfactor that reflects a perceived accuracy of the technique to produce aweighted score for that area of interest. The weighting factors may bepredetermined or may be based upon a machine learned model (e.g., aregression model, a neural network) that learns and/or adjustsweightings for each of the techniques based upon user feedback. Multipletechniques may identify the same, or overlapping areas of interest. Insome examples, the areas of interest are clustered based upon theirproximity in the image. Each cluster's associated weighted scores aresummed to produce a cluster score. The proposed cropping region may bethe smallest rectangle that includes all clusters with scores above apredetermined threshold.

Turning now to FIG. 2 a diagram of a cropping system 210 is shownaccording to some examples of the present disclosure. Cropping system210 may be implemented on one or more computing devices (e.g., a mobiledevice). The components of cropping system 210 shown in FIG. 2 may beimplemented as software (e.g., software modules) or hardware (e.g.,dedicated processing components). Cropping system 210 may include acontroller 215, and one or more cropping determiners that applydifferent cropping methods, such as facial recognition determiner 220,emotion detection determiner 225, and landmark detection determiner 230.Cropping system 210 may interface with external systems, such as firstimage library 235. First image library 235 may be a storage location ona computing device of the user (e.g., where the cropping system 210 isalso running or a different system), a cloud storage system (e.g., anetwork based image storage system), and the like. The first imagelibrary 235 may be specific to a particular user or group of users e.g.in contrast to image libraries that store images from unrelated orunaffiliated persons. Cropping system 210 may also interface with asocial networking service 240. Cropping system 210 may retrieve or scanpictures shared by the user, or by the user's connections for purposesof facial matching using the facial recognition determiner 220. Thecropping system 210 may provide for user privacy controls and may bepermission based such that the cropping system 210 only accesses filesand images with user consent. The cropping system 210 may also interfacewith a second image library 245 which may contain a library of images oflandmarks that may be utilized by the landmark detection determiner 230to determine if any landmarks are present in a digital image.

A digital image, such as digital image 250 may be received by thecontroller 215. The controller 215 may include a dispatcher 255.Dispatcher 255 may send the digital image 250 to one, more than one, orall of the cropping determiners, such as facial recognition determiner220, emotion detection determiner 225, landmark detection determiner230, and other cropping determiners that are not shown. In someexamples, the cropping determiners may be plug-ins that may be added,removed, updated, or otherwise modified without having to change thecode of the cropping system 210 other than to change or add the plug-in.

Cropping determiners may search for one or more areas of interest in thedigital image and output those areas of interest back to the controller215. Combiner may receive the areas of interest from the variouscropping determiners. In some examples, each cropping determiner mayreturn one or more areas of interest. In some examples, areas ofinterest may include associated confidence levels that quantify howconfident the cropping determiners are that the returned areas ofinterest are areas of interest to the user.

Combiner 260 may take these areas of interest and produce a proposedcropping region. The proposed cropping region may be a cropping area,such as a cropping rectangle, a cropping circle, or other area. Thisproposed cropping region, as previously explained, is the region of theimage that is left after the cropping region. That is, regions of theimage outside the cropping region are cropped out. For example, thecombiner 260 may select one, multiple, or all of the areas of interestreturned by the cropping determiners and crop such that these areas ofinterest are included in the proposed cropping region. In the process,the combiner 260 may crop-out (e.g., remove) one or more of the areas ofinterest that were not selected, and/or areas of the image that were notidentified as areas of interest. In the present disclosure, the proposedcropping region refers to the area left in the image after the crop iscompleted (e.g., the image is cropped to the cropping region). In someexamples, the combiner may select all the returned areas and determine aproposed cropping region that may include all the areas of interest. Insome examples, the cropping region may be a rectangle that is a sizethat is of a minimum size (or within a predetermined amount of pixels toa minimum size) to encompass all the areas of interest. In someexamples, the cropping region may be another shape that may encompassone or more of the areas of interest.

In other examples, the combiner 260 may not include all of the areas ofinterest and instead may select some, but not others. For example, thecombiner 260 may utilize a weighting function that may weigh theconfidence values of each area of interest returned by the croppingdeterminers to produce a score for each area of interest. Areas ofinterest that score above a predetermined threshold score may beincluded in the cropping region. Areas of interest that score below apredetermined threshold may not be considered in the determination ofthe cropping region. That is, they may end up in the cropping region byvirtue of being in a location that is included as a result ofdetermining the cropping area based upon other regions of interest, butthose areas of interest are not used to determine the cropping region.The weights used may be machine-learned weights (e.g., using aregression algorithm). The weights may be trained using manuallylabelled example images. As an example method of determining a croppingregion, the combiner may iterate through all the areas of interest tofind the topmost, leftmost, rightmost, and bottommost points of interestand then set the cropping area to be a rectangle with a top, left,right, and bottom lines corresponding to these points.

Once a proposed cropping region is determined by combiner 260, in someexamples, the GUI 265 may output the image with the cropping regionidentified. The GUI may be displayed on a computing device of the user.In some examples, the computing device of the user may be a computingdevice executing the cropping system 210, but in other examples, may bea different computing device. For example, the cropping system 210 maybe a network-based service and the GUI may be sent by the croppingsystem 210 to a computing device of a user over a network. The user maythen provide input 280 accepting, rejecting, or adjusting the croppingregion. In some examples, the input 280 may be utilized to refine themachine learned weights of the combiner 260, or machine learnedalgorithms that are used by the cropping determiners.

Cropper 270 applies the proposed cropping region (in some examples, aspotentially modified by GUI 265 as a result of user input 280) to cropthe image such that the areas outside the cropped region of the digitalimage 250 are removed to produce cropped image 290.

Turning now to FIG. 3, a method 300 for automatically cropping an imageis shown according to some examples of the present disclosure. Method300 may be performed by a cropping system (e.g., cropping system 210)that is instantiated by a computing device. At operation 310 the systemmay receive a digital image. The digital image may be received over anetwork from another computing device, from another component orapplication on the computing device (e.g., from an image capture programor driver), from a storage location, or the like. At operation 315 thecropping system may determine one or more areas of interest. Forexample, by applying one or more methods, such as facial recognitionmatching, emotion detection, and landmark detection to produce areas ofinterest. At operation 317 the system may determine the cropping areabased upon the areas of interest. For example, selecting one, more thanone, or all of the areas of interest and determining a croppingrectangle that includes the selected areas of interest. In someexamples, the cropping area is the smallest rectangle (or othergeometric shape) that includes all the areas of interest.

At operation 320 the cropping system 210 may optionally present agraphical user interface (GUI) which may allow the user to makemodifications to the cropping area. At operation 325 the cropping system210 may optionally receive modifications, input indicating an acceptanceof the cropping region, input indicating a rejection of the croppingregion, or the like from the user. At operation 330, the cropping systemmay crop to the cropping region (which may have been modified in someexamples by the input received in operation 325).

Turning now to FIG. 4, a method 400 of cropping based upon emotiondetection is shown according to some examples of the present disclosure.Method 400 may be an example of operation 315 from FIG. 3. At operation410 the system may utilize a face detection algorithm to detect faces inthe digital image. For example, by utilizing genetic algorithms. Atoperation 415 the system may detect emotions from the detected faces.For example, the system may employ the FACS to code facial expressionsand then utilize a Bayesian network to determine the emotions based uponone or more of the FACS codings assigned to the facial expression. Atoperation 420 the system may cluster the images based upon the emotions,and in some examples, based upon the location of the detected faces inthe image. For example, similar emotions (as determined by apredetermined list of similar emotions) within a predetermined proximityof each other may be clustered into a group of faces.

At operation 425, the system may select a cluster of faces. Theselection may be based upon number—e.g., the system may select thecluster with the greatest number of faces, the selection may be basedupon location in the image (e.g., faces in the center of the image), andthe like. In some examples, more than one (or all) of the clusters maybe selected. At operation 430 the faces of the selected cluster arereturned as areas of interest that may be utilized to determine acropping region (e.g., such as at operation 317).

Turning now to FIG. 5 a method 500 of cropping using facial recognitionis shown according to some examples of the present disclosure. Method500 may be an example of operation 315 from FIG. 3. At operation 510 thefaces in the received digital image may be detected. This may be doneutilizing a face detection algorithm such as a genetic algorithm. Atoperation 515 the system may utilize a face matching algorithm todetermine whether a similar face appears in a digital image in thecollection of digital images belonging to the user. As noted, facialrecognition techniques may be utilized such as principal componentanalysis using eigen-faces, linear discriminant analysis, elastic bunchgraph matching, hidden Markov models, and the like. For example, thealgorithm may identify facial features by extracting landmarks (e.g.,size and shape of the eyes, position of the mouth, and shape of the jaw)from an image of the subject's face. These features may be utilized tosearch for other images that have similar features. At operation 520 thesystem may select one, more than one, or all of the matching faces toreturn as areas of interest. For example, if a single face matches, thatlocation of that face may be returned. If multiple faces match, multipleareas of interest may be returned that correspond to the matched faces.In some examples, the system may select one or more (but not all) of thematching faces to return.

Turning now to FIG. 6, a method 600 of a landmark detection croppingalgorithm is shown according to some examples of the present disclosure.Method 600 may be an example of operation 315 from FIG. 3. At operation610 the system may compare the image to stored images of landmarks todetect matches 615. For example, the system may utilize a machinelearning algorithm to determine if a landmark is present in the digitalimage. For example, a genetic algorithm, principal component analysis,linear discriminant analysis, elastic bunch graph matching, hiddenMarkov models, and the like. At operation 620 the system may select one,more than one, or all of the landmarks that are matched to return asareas of interest.

Turning now to FIG. 7, a method 700 of combining multiple croppingmethods to produce an automatic cropping is shown according to someexamples of the present disclosure. Method 700 may be an example ofoperation 315 from FIG. 3. At operation 710, the cropping systemdispatches the digital image to multiple cropping determiners (thatapply different cropping methods to determine areas of interest in theimage). For example, one or more of the emotion detection, facialrecognition matching, landmark detection, and the like. In otherexamples, the system may also dispatch the digital image to othercropping determiners not herein discussed. At operation 715 the croppingdeterminers may return, and the cropping system may receive, areas ofinterest determined by each of the cropping determiners.

At operation 720, the system may determine regions of interest toutilize for determining a cropping region based upon the returned areasof interest. In some examples, the areas of interest received atoperation 715 may be clustered based upon location that is, areas ofinterest that are near each other may be clustered. Clusters thatcontain over a predetermined threshold of areas of interest, or the toppredetermined number or percent of areas of interest may be selected. Inother examples, the areas of interest may have a correspondingconfidence score. The system may select areas of interest for inclusionin the cropping region based upon the confidence scores. For example,areas of interest that have corresponding confidence scores above apredetermined threshold may be selected. In some examples, the toppredetermined number or percentage of areas of interest (as ranked byconfidence score) may be selected. In some examples, the confidencescores may be multiplied by a weighting factor to produce a score foreach area of interest. The weighting factors may be predetermined, maybe determined based upon a machine learning algorithm, or the like.

FIG. 8 illustrates a block diagram of an example machine 800 upon whichany one or more of the techniques (e.g., methodologies) discussed hereinmay perform. In alternative embodiments, the machine 800 may operate asa standalone device or may be connected (e.g., networked) to othermachines. In a networked deployment, the machine 800 may operate in thecapacity of a server machine, a client machine, or both in server-clientnetwork environments. In an example, the machine 800 may act as a peermachine in peer-to-peer (P2P) (or other distributed) networkenvironment. The machine 800 may be a personal computer (PC), a tabletPC, a set-top box (STB), a personal digital assistant (PDA), a mobiletelephone, a smart phone, a web appliance, a network router, switch orbridge, or any machine capable of executing instructions (sequential orotherwise) that specify actions to be taken by that machine. Forexample, the machine 800 may be a computing device that may implementthe cropping system 210, social networking service 240, first imagelibrary 235, second image library 245, and the methods of FIGS. 3-7.Further, while only a single machine is illustrated, the term “machine”shall also be taken to include any collection of machines thatindividually or jointly execute a set (or multiple sets) of instructionsto perform any one or more of the methodologies discussed herein, suchas cloud computing, software as a service (SaaS), other computer clusterconfigurations.

Examples, as described herein, may include, or may operate on, logic ora number of components, modules, or mechanisms. Modules are tangibleentities (e.g., hardware) capable of performing specified operations andmay be configured or arranged in a certain manner. In an example,circuits may be arranged (e.g., internally or with respect to externalentities such as other circuits) in a specified manner as a module. Inan example, the whole or part of one or more computer systems (e.g., astandalone, client or server computer system) or one or more hardwareprocessors may be configured by firmware or software (e.g.,instructions, an application portion, or an application) as a modulethat operates to perform specified operations. In an example, thesoftware may reside on a machine readable medium. In an example, thesoftware, when executed by the underlying hardware of the module, causesthe hardware to perform the specified operations.

Accordingly, the term “module” is understood to encompass a tangibleentity, be that an entity that is physically constructed, specificallyconfigured (e.g., hardwired), or temporarily (e.g., transitorily)configured (e.g., programmed) to operate in a specified manner or toperform part or all of any operation described herein. Consideringexamples in which modules are temporarily configured, each of themodules need not be instantiated at any one moment in time. For example,where the modules comprise a general-purpose hardware processorconfigured using software, the general-purpose hardware processor may beconfigured as respective different modules at different times. Softwaremay accordingly configure a hardware processor, for example, toconstitute a particular module at one instance of time and to constitutea different module at a different instance of time.

Machine (e.g., computer system) 800 may include a hardware processor 802(e.g., a central processing unit (CPU), a graphics processing unit(GPU), a hardware processor core, or any combination thereof), a mainmemory 804 and a static memory 806, some or all of which may communicatewith each other via an interlink (e.g., bus) 808. The machine 800 mayfurther include a display unit 810, an alphanumeric input device 812(e.g., a keyboard), and a user interface (UI) navigation device 814(e.g., a mouse). In an example, the display unit 810, input device 812and UI navigation device 814 may be a touch screen display. The machine800 may additionally include a storage device (e.g., drive unit) 816, asignal generation device 818 (e.g., a speaker), a network interfacedevice 820, and one or more sensors 821, such as a global positioningsystem (GPS) sensor, compass, accelerometer, or other sensor. Themachine 800 may include an output controller 828, such as a serial(e.g., universal serial bus (USB), parallel, or other wired or wireless(e.g., infrared (IR), near field communication (NFC), etc.) connectionto communicate or control one or more peripheral devices (e.g., aprinter, card reader, etc.).

The storage device 816 may include a machine readable medium 822 onwhich is stored one or more sets of data structures or instructions 824(e.g., software) embodying or utilized by any one or more of thetechniques or functions described herein. The instructions 824 may alsoreside, completely or at least partially, within the main memory 804,within static memory 806, or within the hardware processor 802 duringexecution thereof by the machine 800. In an example, one or anycombination of the hardware processor 802, the main memory 804, thestatic memory 806, or the storage device 816 may constitute machinereadable media.

While the machine readable medium 822 is illustrated as a single medium,the term “machine readable medium” may include a single medium ormultiple media (e.g., a centralized or distributed database, and/orassociated caches and servers) configured to store the one or moreinstructions 824.

The term “machine readable medium” may include any medium that iscapable of storing, encoding, or carrying instructions for execution bythe machine 800 and that cause the machine 800 to perform any one ormore of the techniques of the present disclosure, or that is capable ofstoring, encoding or carrying data structures used by or associated withsuch instructions. Non-limiting machine readable medium examples mayinclude solid-state memories, and optical and magnetic media. Specificexamples of machine readable media may include: non-volatile memory,such as semiconductor memory devices (e.g., Electrically ProgrammableRead-Only Memory (EPROM), Electrically Erasable Programmable Read-OnlyMemory (EEPROM)) and flash memory devices; magnetic disks, such asinternal hard disks and removable disks; magneto-optical disks; RandomAccess Memory (RAM); Solid State Drives (SSD); and CD-ROM and DVD-ROMdisks. In some examples, machine readable media may includenon-transitory machine readable media. In some examples, machinereadable media may include machine readable media that is not atransitory propagating signal.

The instructions 824 may further be transmitted or received over acommunications network 826 using a transmission medium via the networkinterface device 820. The Machine 800 may communicate with one or moreother machines utilizing any one of a number of transfer protocols(e.g., frame relay, internet protocol (IP), transmission controlprotocol (TCP), user datagram protocol (UDP), hypertext transferprotocol (HTTP), etc.). Example communication networks may include alocal area network (LAN), a wide area network (WAN), a packet datanetwork (e.g., the Internet), mobile telephone networks (e.g., cellularnetworks), Plain Old Telephone (POTS) networks, and wireless datanetworks (e.g., Institute of Electrical and Electronics Engineers (IEEE)802.11 family of standards known as Wi-Fi®, IEEE 802.16 family ofstandards known as WiMax®), IEEE 802.15.4 family of standards, a LongTerm Evolution (LTE) family of standards, a Universal MobileTelecommunications System (UMTS) family of standards, peer-to-peer (P2P)networks, among others. In an example, the network interface device 820may include one or more physical jacks (e.g., Ethernet, coaxial, orphone jacks) or one or more antennas to connect to the communicationsnetwork 826. In an example; the network interface device 820 may includea plurality of antennas to wirelessly communicate using at least one ofsingle-input multiple-output (SIMO), multiple-input multiple-output(MIMO), or multiple-input single-output (MISO) techniques. In sonicexamples, the network interface device 820 may wirelessly communicateusing Multiple User MIMO techniques.

OTHER NOTES AND EXAMPLES

Example 1 is a machine-readable medium, the machine-readable mediumincluding instructions, which when executed by a machine, cause themachine to perform operations comprising: receiving a digital image;detecting three or more faces in the digital image; for each particularface in the three or more faces, determining an emotion displayed by theparticular face; clustering the three or more faces into two or moreclusters, each particular cluster comprising faces displaying emotionsthat are the same or are classified as related to other faces in theparticular cluster; selecting a cluster of the two or more clusters; andcropping the digital image based upon the faces in the selected cluster.

In Example 2, the subject matter of Example 1 optionally includeswherein the operations of cropping the digital image based upon thefaces in the selected cluster comprises operations of cropping thedigital image so as not to include a face in a cluster of the two ormore clusters that was not selected.

In Example 3, the subject matter of any one or more of Examples 1-2optionally include wherein the operations further comprise: for eachparticular face in the set of three or more faces, searching for amatching face in an image storage corresponding to a user; andresponsive to determining that a face in the set of three or more facesmatches a face in an image stored in the image storage of the user,cropping the digital image based additionally upon the matched face.

In Example 4, the subject matter of Example 3 optionally includeswherein the image storage is a network-based image storage.

In Example 5, the subject matter of any one or more of Examples 3-4optionally include wherein the image storage is a social networkingservice.

In Example 6, the subject matter of Example 5 optionally includeswherein images of the image storage correspond to social media posts ofthe user or posts of connections of the user on the social networkingservice.

In Example 7, the subject matter of any one or more of Examples 1-6optionally include wherein the operations further comprise: detecting alandmark in the digital image; and cropping the digital image basedadditionally upon the landmark.

In Example 8, the subject matter of Example 7 optionally includeswherein the landmark is detected based upon a comparison of features ofthe digital image with features of a library of digital images includinglandmarks.

In Example 9, the subject matter of any one or more of Examples 1-8optionally include wherein the operations further comprise: for eachparticular face in the set of three or more faces, searching for amatching face in an image storage of a user; detecting a landmark in thedigital image; and cropping the digital image based upon the matchingface, the landmark, and the set of faces in the selected cluster.

In Example 10, the subject matter of Example 9 optionally includeswherein the operations of cropping the digital image based upon thematching face, the landmark, and the faces in the selected clustercomprises the operations of: producing a first score based upon a firstconfidence value corresponding to the set of three or more faces in theselected cluster and a first weighting factor; producing a second scorebased upon a second confidence value corresponding to the matching faceand a second weighting factor; producing a third score based upon athird confidence value corresponding to the landmark and a thirdweighting factor; and cropping the digital image based upon the first,second and third scores.

In Example 11, the subject matter of Example 10 optionally includeswherein the first, second, and third weighting factors are determinedbased upon a machine learning algorithm.

In Example 12, the subject matter of Example 11 optionally includeswherein a rejection by the user of the cropped digital image is used toadjust one or more of the first, second, or third weighting factors.

Example 13 is a system for cropping an image, the system comprising: aprocessor; a memory including instructions, which when executed by theprocessor, cause the system to perform operations comprising: receivinga digital image; detecting three or more faces in the digital image; foreach particular face in the three or more faces, determining an emotiondisplayed by the particular face; clustering the three or more facesinto two or more clusters, each particular cluster comprising facesdisplaying emotions that are the same or are classified as related toother faces in the particular cluster; selecting a cluster of the two ormore clusters; and cropping the digital image based upon the faces inthe selected cluster.

In Example 14, the subject matter of Example 13 optionally includeswherein the operations of cropping the digital image based upon thefaces in the selected cluster comprises operations of cropping thedigital image so as not to include a face in a cluster of the two ormore clusters that was not selected.

In Example 15, the subject matter of any one or more of Examples 13-14optionally include wherein the operations further comprise: for eachparticular face in the set of three or more faces, searching for amatching face in an image storage corresponding to a user; andresponsive to determining that a face in the set of three or more facesmatches a face in an image stored in the image storage of the user,cropping the digital image based additionally upon the matched face.

In Example 16, the subject matter of Example 15 optionally includeswherein the image storage is a network-based image storage.

In Example 17, the subject matter of any one or more of Examples 15-16optionally include wherein the image storage is a social networkingservice.

In Example 18, the subject matter of Example 17 optionally includeswherein images of the image storage correspond to social media posts ofthe user or posts of connections of the user on the social networkingservice.

In Example 19, the subject matter of any one or more of Examples 13-18optionally include wherein the operations further comprise: detecting alandmark in the digital image; and cropping the digital image basedadditionally upon the landmark.

In Example 20, the subject matter of Example 19 optionally includeswherein the landmark is detected based upon a comparison of features ofthe digital image with features of a library of digital images includinglandmarks.

In Example 21, the subject matter of any one or more of Examples 13-20optionally include wherein the operations further comprise: for eachparticular face in the set of three or more faces, searching for amatching face in an image storage of a user; detecting a landmark in thedigital image; and cropping the digital image based upon the matchingface, the landmark, and the set of faces in the selected cluster.

In Example 22, the subject matter of Example 21 optionally includeswherein the operations of cropping the digital image based upon thematching face, the landmark, and the faces in the selected clustercomprises the operations of: producing a first score based upon a firstconfidence value corresponding to the set of three or more faces in theselected cluster and a first weighting factor; producing a second scorebased upon a second confidence value corresponding to the matching faceand a second weighting factor; producing a third score based upon athird confidence value corresponding to the landmark and a thirdweighting factor; and cropping the digital image based upon the first,second and third scores.

In Example 23, the subject matter of Example 22 optionally includeswherein the first, second, and third weighting factors are determinedbased upon a machine learning algorithm.

In Example 24, the subject matter of Example 23 optionally includeswherein a rejection by the user of the cropped digital image is used toadjust one or more of the first, second, or third weighting factors.

Example 25 is a method for cropping an image, the method comprising:receiving a digital image; detecting three or more faces in the digitalimage; for each particular face in the three or more faces, determiningan emotion displayed by the particular face; clustering the three ormore faces into two or more clusters, each particular cluster comprisingfaces displaying emotions that are the same or are classified as relatedto other faces in the particular cluster; selecting a cluster of the twoor more clusters; and cropping the digital image based upon the faces inthe selected cluster.

In Example 26, the subject matter of Example 25 optionally includeswherein cropping the digital image based upon the faces in the selectedcluster comprises cropping the digital image so as not to include a facein a cluster of the two or more clusters that was not selected.

In Example 27, the subject matter of any one or more of Examples 25-26optionally include for each particular face in the set of three or morefaces, searching for a matching face in an image storage correspondingto a user; and responsive to determining that a face in the set of threeor more faces matches a face in an image stored in the image storage ofthe user, cropping the digital image based additionally upon the matchedface.

In Example 28, the subject matter of Example 27 optionally includeswherein the image storage is a network-based image storage.

In Example 29, the subject matter of any one or more of Examples 27-28optionally include wherein the image storage is a social networkingservice.

In Example 30, the subject matter of Example 29 optionally includeswherein images of the image storage correspond to social media posts ofthe user or posts of connections of the user on the social networkingservice.

In Example 31, the subject matter of any one or more of Examples 25-30optionally include detecting a landmark in the digital image; andcropping the digital image based additionally upon the landmark.

In Example 32, the subject matter of Example 31 optionally includeswherein the landmark is detected based upon a comparison of features ofthe digital image with features of a library of digital images includinglandmarks.

In Example 33, the subject matter of any one or more of Examples 25-32optionally include for each particular face in the set of three or morefaces, searching for a matching face in an image storage of a user;detecting a landmark in the digital image; and cropping the digitalimage based upon the matching face, the landmark, and the set of facesin the selected cluster.

In Example 34, the subject matter of Example 33 optionally includeswherein cropping the digital image based upon the matching face, thelandmark, and the faces in the selected cluster comprises: producing afirst score based upon a first confidence value corresponding to the setof three or more faces in the selected cluster and a first weightingfactor; producing a second score based upon a second confidence valuecorresponding to the matching face and a second weighting factor;producing a third score based upon a third confidence valuecorresponding to the landmark and a third weighting factor; and croppingthe digital image based upon the first, second and third scores.

In Example 35, the subject matter of Example 34 optionally includeswherein the first, second, and third weighting factors are determinedbased upon a machine learning algorithm.

In Example 36, the subject matter of Example 35 optionally includeswherein a rejection by the user of the cropped digital image is used toadjust one or more of the first, second, or third weighting factors.

Example 37 is a device for cropping an image, the device comprising:means for receiving a digital image; means for detecting three or morefaces in the digital image; for each particular face in the three ormore faces, means for determining an emotion displayed by the particularface; means for clustering the three or more faces into two or moreclusters, each particular cluster comprising faces displaying emotionsthat are the same or are classified as related to other faces in theparticular cluster; means for selecting a cluster of the two or moreclusters; and means for cropping the digital image based upon the facesin the selected cluster.

In Example 38, the subject matter of Example 37 optionally includeswherein the means for cropping the digital image based upon the faces inthe selected cluster comprises means for cropping the digital image soas not to include a face in a cluster of the two or more clusters thatwas not selected.

In Example 39, the subject matter of any one or more of Examples 37-38optionally include for each particular face in the set of three or morefaces, means for searching for a matching face in an image storagecorresponding to a user; and responsive to determining that a face inthe set of three or more faces matches a face in an image stored in theimage storage of the user, means for cropping the digital image basedadditionally upon the matched face.

In Example 40, the subject matter of Example 39 optionally includeswherein the image storage is a network-based image storage.

In Example 41, the subject matter of any one or more of Examples 39-40optionally include wherein the image storage is a social networkingservice.

In Example 42, the subject matter of Example 41 optionally includeswherein images of the image storage correspond to social media posts ofthe user or posts of connections of the user on the social networkingservice.

In Example 43, the subject matter of any one or more of Examples 37-42optionally include means for detecting a landmark in the digital image;and means for cropping the digital image based additionally upon thelandmark.

In Example 44, the subject matter of Example 43 optionally includeswherein the landmark is detected based upon a comparison of features ofthe digital image with features of a library of digital images includinglandmarks.

In Example 45, the subject matter of any one or more of Examples 37-44optionally include for each particular face in the set of three or morefaces, means for searching for a matching face in an image storage of auser; means for detecting a landmark in the digital image; and means forcropping the digital image based upon the matching face, the landmark,and the set of faces in the selected cluster.

In Example 46, the subject matter of Example 45 optionally includeswherein the means for cropping the digital image based upon the matchingface, the landmark, and the faces in the selected cluster comprises:means for producing a first score based upon a first confidence valuecorresponding to the set of three or more faces in the selected clusterand a first weighting factor; means for producing a second score basedupon a second confidence value corresponding to the matching face and asecond weighting factor; means for producing a third score based upon athird confidence value corresponding to the landmark and a thirdweighting factor; and means for cropping the digital image based uponthe first, second and third scores.

In Example 47, the subject matter of Example 46 optionally includeswherein the first, second, and third weighting factors are determinedbased upon a machine learning algorithm.

In Example 48, the subject matter of Example 47 optionally includeswherein a rejection by the user of the cropped digital image is used toadjust one or more of the first, second, or third weighting factors.

What is claimed is:
 1. A machine-readable medium, the machine-readablemedium including instructions, which when executed by a machine, causethe machine to perform operations comprising: receiving a digital image;detecting three or more faces in the digital image; for each particularface in the three or more faces, determining an emotion displayed by theparticular face; clustering the three or more faces into two or moreclusters, each particular cluster comprising faces displaying emotionsthat are the same or are classified as related to other faces in theparticular cluster; selecting a cluster of the two or more clusters; andcropping the digital image based upon the faces in the selected cluster.2. The machine-readable medium of claim 1, wherein the operations ofcropping the digital image based upon the faces in the selected clustercomprises operations of cropping the digital image so as not to includea face in a cluster of the two or more clusters that was not selected.3. The machine-readable medium of claim 1, wherein the operationsfurther comprise: for each particular face in the set of three or morefaces, searching for a matching face in an image storage correspondingto a user; and responsive to determining that a face in the set of threeor more faces matches a face in an image stored in the image storage ofthe user, cropping the digital image based additionally upon the matchedface.
 4. The machine-readable medium of claim 3, wherein the imagestorage is a network-based image storage.
 5. The machine-readable mediumof claim 3, wherein the image storage is a social networking service. 6.The machine-readable medium of claim 5, wherein images of the imagestorage correspond to social media posts of the user or posts ofconnections of the user on the social networking service.
 7. Themachine-readable medium of claim 1, wherein the operations furthercomprise: detecting a landmark in the digital image; and cropping thedigital image based additionally upon the landmark.
 8. Themachine-readable medium of claim 7, wherein the landmark is detectedbased upon a comparison of features of the digital image with featuresof a library of digital images including landmarks.
 9. Themachine-readable medium of claim 1, wherein the operations furthercomprise: for each particular face in the set of three or more faces,searching for a matching face in an image storage of a user; detecting alandmark in the digital image; and cropping the digital image based uponthe matching face, the landmark, and the set of faces in the selectedcluster.
 10. The machine-readable medium of claim 9, wherein theoperations of cropping the digital image based upon the matching face,the landmark, and the faces in the selected cluster comprises theoperations of: producing a first score based upon a first confidencevalue corresponding to the set of three or more faces in the selectedcluster and a first weighting factor; producing a second score basedupon a second confidence value corresponding to the matching face and asecond weighting factor; producing a third score based upon a thirdconfidence value corresponding to the landmark and a third weightingfactor; and cropping the digital image based upon the first, second andthird scores.
 11. The machine-readable medium of claim 10, wherein thefirst, second, and third weighting factors are determined based upon amachine learning algorithm.
 12. The machine-readable medium of claim 11,wherein a rejection by the user of the cropped digital image is used toadjust one or more of the first, second, or third weighting factors. 13.A system for cropping an image, the system comprising: a processor; amemory including instructions, which when executed by the processor,cause the system to perform operations comprising: receiving a digitalimage; detecting three or more faces in the digital image; for eachparticular face in the three or more faces, determining an emotiondisplayed by the particular face; clustering the three or more facesinto two or more clusters, each particular cluster comprising facesdisplaying emotions that are the same or are classified as related toother faces in the particular cluster; selecting a cluster of the two ormore clusters; and cropping the digital image based upon the faces inthe selected cluster.
 14. The system of claim 13, wherein the operationsof cropping the digital image based upon the faces in the selectedcluster comprises operations of cropping the digital image so as not toinclude a face in a cluster of the two or more clusters that was notselected.
 15. The system of claim 13, wherein the operations furthercomprise: for each particular face in the set of three or more faces,searching for a matching face in an image storage corresponding to auser; and responsive to determining that a face in the set of three ormore faces matches a face in an image stored in the image storage of theuser, cropping the digital image based additionally upon the matchedface.
 16. The system of claim 13, wherein the operations furthercomprise: for each particular face in the set of three or more faces,searching for a matching face in an image storage of a user; detecting alandmark in the digital image; and cropping the digital image based uponthe matching face, the landmark, and the set of faces in the selectedcluster.
 17. A method for cropping an image, the method comprising:receiving a digital image; detecting three or more faces in the digitalimage; for each particular face in the three or more faces, determiningan emotion displayed by the particular face; clustering the three ormore faces into two or more clusters, each particular cluster comprisingfaces displaying emotions that are the same or are classified as relatedto other faces in the particular cluster; selecting a cluster of the twoor more clusters; and cropping the digital image based upon the faces inthe selected cluster.
 18. The method of claim 17, comprising: for eachparticular face in the set of three or more faces, searching for amatching face in an image storage corresponding to a user; andresponsive to determining that a face in the set of three or more facesmatches a face in an image stored in the image storage of the user,cropping the digital image based additionally upon the matched face. 19.The method of claim 17, comprising: for each particular face in the setof three or more faces, searching for a matching face in an imagestorage of a user; detecting a landmark in the digital image; andcropping the digital image based upon the matching face, the landmark,and the set of faces in the selected cluster.
 20. The method of claim19, wherein cropping the digital image based upon the matching face, thelandmark, and the faces in the selected cluster comprises: producing afirst score based upon a first confidence value corresponding to the setof three or more faces in the selected cluster and a first weightingfactor; producing a second score based upon a second confidence valuecorresponding to the matching face and a second weighting factor;producing a third score based upon a third confidence valuecorresponding to the landmark and a third weighting factor; and croppingthe digital image based upon the first, second and third scores.